<%@ Page Language="C#" Theme="Defaultsys" AutoEventWireup="true" CodeFile="UserCallsList.aspx.cs"
    Inherits="UserCallsList" Title="Rapport Plan System - User calls list" MasterPageFile="~/MasterPage.master" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="contTable">
                <asp:Label ID="lblCallsToAssign" runat="server" Text="No. of calls to be assigned:"></asp:Label>
                <asp:GridView ID="grdUsers" SkinID="gvGrid" runat="server" AutoGenerateColumns="false"
                    OnRowCreated="grdUsers_RowCreated" Width="100%" AllowPaging="true" OnPageIndexChanging="grdUsers_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" 
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                            HeaderStyle-Width="3%">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Id" Visible="false">
                            <ItemTemplate>
                                <asp:TextBox ID="txtId" runat="server" Text='<%# Eval("UserId") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        
                        <asp:BoundField HeaderText="User" DataField="ConnectName" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
                            HeaderStyle-Width="60%" />
                            
                        <asp:BoundField HeaderText="Max. No. of calls" DataField="MaxCallPerWeek" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
                            
                        <asp:TemplateField HeaderText="No. of calls " 
                                HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:Label ID="lblNoCalls" runat="server" Text=""></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Assign" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="literalId" runat="server"></asp:Literal>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        There are currently no user calls.</EmptyDataTemplate>
                    <PagerStyle VerticalAlign="Middle" HorizontalAlign="Left" Wrap="False" CssClass="paging"
                        Font-Bold="True"></PagerStyle>
                    <PagerSettings Mode="NumericFirstLast" />
                </asp:GridView>
                <asp:Button ID="btnAssignCalls" runat="server" Text="Assign calls" OnClick="AssignCalls" />
            </td>
        </tr>
    </table>
</asp:Content>
